package com.mxx.common.netty;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @Auther: Mr. Zeng
 * @Date: 2020/8/15 17:37
 * @Description: 暂无描述
 */
@ConfigurationProperties(prefix = "sywl.netty")
@ConditionalOnMissingBean(NettyServiceProperties.class)
public final class NettyServiceProperties {
    private Integer maxContextLength = 65536;
    private Boolean noDelay = true;
    private Boolean keepAlive = true;
    private Boolean reuseAddr = false;
    private Integer rcvBuf = 2048;
    private Integer sendBuf = 2048;
    @Value("${server.port:9100}")
    private int port;

    public Integer getMaxContextLength() {
        return maxContextLength;
    }

    public void setMaxContextLength(Integer maxContextLength) {
        this.maxContextLength = maxContextLength;
    }

    public Boolean getNoDelay() {
        return noDelay;
    }

    public void setNoDelay(Boolean noDelay) {
        this.noDelay = noDelay;
    }

    public Boolean getKeepAlive() {
        return keepAlive;
    }

    public void setKeepAlive(Boolean keepAlive) {
        this.keepAlive = keepAlive;
    }

    public Boolean getReuseAddr() {
        return reuseAddr;
    }

    public void setReuseAddr(Boolean reuseAddr) {
        this.reuseAddr = reuseAddr;
    }

    public Integer getRcvBuf() {
        return rcvBuf;
    }

    public void setRcvBuf(Integer rcvBuf) {
        this.rcvBuf = rcvBuf;
    }

    public Integer getSendBuf() {
        return sendBuf;
    }

    public void setSendBuf(Integer sendBuf) {
        this.sendBuf = sendBuf;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }
}
